package com.mzj.saas.mservice.lifePay.repository;

import com.mzj.saas.mservice.lifePay.entity.LivingPaymentBind;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface LivingPaymentBindRepository extends PagingAndSortingRepository<LivingPaymentBind, Long>, JpaSpecificationExecutor<LivingPaymentBind>, JpaRepository<LivingPaymentBind,Long> {

    LivingPaymentBind findByBillNumber(String billNumber);

    List<LivingPaymentBind> findByUserIdAndPayStatusAndStatus(String userId,Integer payStatus,Integer status);

    @Transactional
    void deleteByLivingPaymentGroupId(Long livingPaymentGroupId);

}
